An inkjet printer jets ink onto a printing medium to print a picture. A distance between a inkjet head and the printing medium should be kept at a constant level, so as to optimize a printing quality. When the above distance becomes smaller, the ink jet range is shortened, a greater number of pixels can be printed on the same area, and a better picture quality is achieved. Conversely, if the distance is enlarged, the printed pixels become smaller. When the distance gets too large, the shape of the pixel is deformed, and the quality of the printed picture will be degraded. Likewise, if the distance is too small, the printing quality may also be affected and the printer head module may track through and pick up wet ink on the printing medium.